package com.kai.dao;

import com.kai.pojo.Emp;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created By ShaoXikai on 2022/5/28
 */
public interface EmpMapper {
    public List<Emp> findAll();

    public int insertZhaoYun();

    public int updateZhaoYun();

    public int deleteZhaoYun();

    Emp selectUserById(@Param("id") Long id);

    List<Emp> selectAll();     // prac 5

    int insertUser(@Param("user") Emp userDao);

    int deleteUser(@Param("name") String name);         // delete by name

    int updateUser(@Param("user") Emp emp);

    public List<Emp> selectSomeCol(@Param("cols") String columns);

    public List<Emp> selectByFirstName(@Param("name") String name);

    public List<Emp> selectByFullName(@Param("name") String name);

    public List<Emp> selectBySalary(@Param("minSal") int minSal,
                                     @Param("maxSal") int maxSal);

    public int deleteByIds(@Param("ids") Long[] ids);

    public List<Emp> selectByIds(@Param("ids") Long[] ids);
}
